window.performEditorCut=function(){if(!window.codeEditor)return;const o=window.codeEditor.getModel().getValueInRange(window.codeEditor.getSelection());o&&window.webViewAPI&&window.webViewAPI.setClipboard&&(window.webViewAPI.setClipboard(o,"string"),window.codeEditor.executeEdits("cut",[{range:window.codeEditor.getSelection(),text:""}]))},window.performEditorCopy=function(){if(!window.codeEditor)return;const o=window.codeEditor.getModel().getValueInRange(window.codeEditor.getSelection());o&&window.webViewAPI&&window.webViewAPI.setClipboard&&window.webViewAPI.setClipboard(o,"string")},window.performEditorPaste=function(o){window.codeEditor&&window.codeEditor.executeEdits("paste",[{range:window.codeEditor.getSelection(),text:o}])},window.performEditorSelectAll=function(){window.codeEditor&&(window.codeEditor.setSelection(window.codeEditor.getModel().getFullModelRange()),window.codeEditor.focus())},window.setEditorContentForRegularFile=function(o,e){window.codeEditor?(window.suppressAutoSave=!1,window.originalContent=void 0!==e?e:o,window.codeEditor.setValue(o),window.codeEditor.focus(),window._suppressBuildChart||"function"!=typeof buildChart||buildChart()):window._pendingEditorContent={content:o,originalContent:e}},window.setEditorWordWrap=function(o){window.codeEditor?(window.codeEditor.updateOptions({wordWrap:o}),localStorage.setItem("msd-word-wrap",o)):localStorage.setItem("msd-word-wrap",o)},window.clearEditorContent=function(){window.codeEditor&&(window.codeEditor.setValue(""),window.suppressAutoSave=!1)},window.highlightLineInEditor=function(o){if(!window.codeEditor||!window.monaco)return;const e=window.codeEditor,i=window.monaco;e.revealLineInCenter(o),e.setPosition({lineNumber:o,column:1}),e.focus();const t=e.deltaDecorations([],[{range:new i.Range(o,1,o,1e3),options:{isWholeLine:!0,className:"monaco-line-highlight",minimap:{color:"#FFE66D",position:i.editor.MinimapPosition.Inline||1},overviewRuler:{color:"#FFE66D",position:i.editor.OverviewRulerLane.Full||7}}}]);setTimeout(()=>{t&&t.length>0&&e.deltaDecorations(t,[])},2e3)};